package nsq

import (
	sqlc "bp/db/sqlc"
	"context"
)

// ListNsqPubPtrsWithLock 列出带锁的nsq_pub
func (s *NsqEntityServiceImp) ListNsqPubPtrsWithLock(ctx context.Context, q *sqlc.Queries, limit int32) (nsqPubPtrs []*sqlc.NsqPub, err error) {
	// slog := util.NewContextLogger(ctx, s.slog)
	rows, err := q.ListNsqPubsNotSuccessToLock(ctx, limit)
	if err != nil {
		return
	}
	// slog.Infof("1 ListNsqPubPtrsWithLock ok")
	nsqPubPtrs = s.MapNsqPubEntityToPtr(rows)
	return
}
